<?php
### PHP 5.1 support (obsolete) ###
if (!function_exists('sys_get_temp_dir')) {
	function sys_get_temp_dir() {
		$tmpfile = tempnam(":\n\\/?><", "");
		$path = dirname($tmpfile);
		return $path;
  	}
}

$temp_dir = sys_get_temp_dir();
if (substr($temp_dir, -1) == DIRECTORY_SEPARATOR) $temp_dir = substr($temp_dir, 0, -1);

$rem = array("\\", "/");
$_GET['user'] = str_replace($rem, '', $_GET['user']);

$log = $temp_dir.DIRECTORY_SEPARATOR.$_GET['user'].'-librarian-import.log';

if(!file_exists($log) || !is_readable($log)) die();
$string = file_get_contents($log);
die($string);
?>